import request from '@/utils/request'

// 查询组装单行列表
export function listAssemblyline(query) {
  return request({
    url: '/wm/assemblyline/list',
    method: 'get',
    params: query
  })
}
// 查询组装单行列表 不分页
export function getListAssemblyline(query) {
  return request({
    url: '/wm/assemblyline/getList',
    method: 'get',
    params: query
  })
}
// 查询组装单行详细
export function getAssemblyline(lineId) {
  return request({
    url: '/wm/assemblyline/' + lineId,
    method: 'get'
  })
}
// 根据单据头id查询组装单行详细
export function getLineInfo(assemblyId) {
  return request({
    url: '/wm/assemblyline/getLineInfo/' + assemblyId,
    method: 'get'
  })
}


// 新增组装单行
export function addAssemblyline(data) {
  return request({
    url: '/wm/assemblyline',
    method: 'post',
    data: data
  })
}

// 修改组装单行
export function updateAssemblyline(data) {
  return request({
    url: '/wm/assemblyline',
    method: 'put',
    data: data
  })
}

// 删除组装单行
export function delAssemblyline(lineId) {
  return request({
    url: '/wm/assemblyline/' + lineId,
    method: 'delete'
  })
}

export function getBomItemStock(data) {
  return request({
    url: '/wm/assemblyline/getBomItemStock',
    method: 'post',
    data: data
  })
}
